package com.wc.AlgoOJ.SQ12L1;


import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/11 17:47
 * @description 部分背包问题
 * http://43.138.190.70:8888/p/SQ12L1
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        WV[] wvs = new WV[n];
        for (int i = 0; i < n; i++) {
            int w = sc.nextInt();
            int v = sc.nextInt();
            WV wv = new WV(w, v);
            wvs[i] = wv;
        }
        Arrays.sort(wvs);
        int idx = 0;
        double ans = 0;
        while (idx < n && wvs[idx].w <= m) {
            m -= wvs[idx].w;
            ans += wvs[idx].v;
            idx++;
        }
        if (idx < n) {
            ans += 1.0 * m * wvs[idx].v_w;
        }
        System.out.printf("%.2f\n", ans);
    }

    static class WV implements Comparable<WV> {
        int w;
        int v;
        double v_w;

        WV(int w, int v) {
            this.w = w;
            this.v = v;
            v_w = 1.0 * v / w;
        }


        @Override
        public int compareTo(WV o) {
            if (this.v_w > o.v_w) {
                return -1;
            } else {
                return 1;
            }
        }
    }
}
